<?php

class ThongtinlienheController extends BaseController {

    public function getIndex() {
        $thongtinlienhe = DB::table('thongtinlienhe')->pluck('thongtinlienhe');
        return View::make('pages.contact')->with('thongtinlienhe', $thongtinlienhe);
    }

    public function getEditcontact() {
        $thongtinlienhe = DB::table('thongtinlienhe')->pluck('thongtinlienhe');
        return View::make('pages.editcontact')->with('thongtinlienhe', $thongtinlienhe);
    }

    public function postUpdatecontact() {
        $input = Input::get('thongtinlienhe');
        DB::table('thongtinlienhe')->where('id', '1')->update(array('thongtinlienhe' => $input));
        return Redirect::to('contacts/editcontact');
    }

}
